package com.ssm.service.impl;

import com.ssm.dao.RecruitInfoMapper;
import com.ssm.entity.RecruitInfo;
import com.ssm.entity.RecruitInfoExample;
import com.ssm.service.NoticeListService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("noticeList")
public class NoticeListServiceImpl implements NoticeListService {
    @Resource(name = "recruitInfoMapper")
    private RecruitInfoMapper recruitInfoMapper;
    @Override
    public List<RecruitInfo> listAllNoticeList() {
        return recruitInfoMapper.selectByExample(new RecruitInfoExample());
    }

    @Override
    public Integer createNoticeList(RecruitInfo recruitInfo) {
        return recruitInfoMapper.insert(recruitInfo);
    }

    @Override
    public Integer update(RecruitInfo recruitInfo) {
        return recruitInfoMapper.updateByPrimaryKey(recruitInfo);
    }

    @Override
    public Integer deleteNoticeList(int infoidid) {
        return recruitInfoMapper.deleteByPrimaryKey(infoidid);
    }

    @Override
    public RecruitInfo getNoticeList(int infoidid) {
        return recruitInfoMapper.selectByPrimaryKey(infoidid);
    }


}
